#include "stdint.h"
typedef struct RateMsg {
        uint8_t dst_mac[6];   /* switch port's MAC address */  
        uint8_t src_mac[6];   /* the sender's MAC address */  
        uint16_t type;          /* ethernet type: RATE_MSG_ETHR_TYPE */
        uint16_t ver;           /* protocol version */
        uint32_t src_ip;        /* flow: src ip address */
        uint32_t dst_ip;        /* flow: dst ip address */
        uint16_t pad;
        uint16_t proto_tp;      /* transport layer protocol */
        uint16_t src_tp;        /* flow: transport layer src port number */
        uint16_t dst_tp;        /* flow: transport layer dst port number*/
        uint64_t rate;          /* rate in bps. this will be changed to
                                 * leaky bucket params in next version */
        uint8_t unused[26];
} RateMsg;

typedef struct sender_spec_t {
	uint32_t src_ip;
	uint32_t dst_ip;
	uint16_t src_tp;
	uint16_t dst_tp;
	uint64_t rate;
} sender_spec_t;

typedef struct tcp_pseudo /*the tcp pseudo header*/
{
  uint32_t src_addr;
  uint32_t dst_addr;
  uint8_t zero;
  uint8_t proto;
  uint16_t length;
} tcp_pseudo;
